commit xxxx
Author: Ivan Zakharyaschev <imz@altlinux.org>
Date:   Sat Feb 13 18:47:09 2021 +0300

    genbasedir: for tests, cause an error due to a race in pipes by sleeping

    Let gen{pkg,src}list start working first.

diff --git a/src/genbasedir b/src/genbasedir
index 61e4d00..63a19e0 100755
--- a/src/genbasedir
+++ b/src/genbasedir
@@ -529,7 +529,7 @@ if [ -z "$hashonly" ]; then
 		save_file "$pkglist.$comp"
 		cat_prev_list_if_patching="$(choose_prev_list "$prev_basedir" pkglist "$comp")" ||
 			Fatal 'Failed to find the previous pkglist, but patching it was requested.'
-		eval "$cat_prev_list_if_patching" |
+		{ sleep .5; eval "$cat_prev_list_if_patching"; } |
 			if ! genpkglist $progress $bloat $noscan \
 					--index "$SRCIDX_COMP" \
 					${patch_basedir:+--prev-stdin} \
@@ -566,7 +566,7 @@ if [ -z "$hashonly" ]; then
 		save_file "$srclist.$comp"
 		cat_prev_list_if_patching="$(choose_prev_list "$prev_basedir" srclist "$comp")" ||
 			Fatal 'Failed to find the previous srclist, but patching it was requested.'
-		eval "$cat_prev_list_if_patching" |
+		{ sleep .5; eval "$cat_prev_list_if_patching"; } |
 			if ! gensrclist $progress $flat $mapi \
 					${patch_basedir:+--prev-stdin} \
 					${comp_add_list_src:+--add-list "$comp_add_list_src"} \
